import request from '../utils/request';

// 接口
export const getData = (payload) => {
  return request.post(`api`, payload);
};


/**
 * 获取专题分类列表
 */
export const getTopicTypes = (data) => {
  return request.post(`/project/topic/getTopicByCondition`, { data });
};

/**
 * 获取专题下所有专题
 */
export const getTopicTypeList = (params) => {
  return request.get(`/project/topic/getTopicById`, { params });
};


/**
 * 获取专题下课程
 */
export const getTopicCourseByTopicId = (params) => {
  return request.get(`/project/topic/getTopicCourseByTopicId`, { params });
};

/**
 * 点赞专题
 */
export const voteTopic = (data) => {
  return request.post(`/project/topic/voteTopic`, { data });
};